<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        let c=10;
        function daoJiShi() {
            var a=new Date();
            var b= a.getSeconds();
            document.getElementById("daotime").innerHTML=c;
            c--;
            if(c<=0){
                window.open("https://www.baidu.com");
                return;
            }
            window.setTimeout("daoJiShi()",1000);
            // window.setInterval("daoJiShi()",10000);
            }




daoJiShi();


    </script>
</head>
<body onload="daoJiShi()">
<div id="daotime">


</div>
</body>
</html>